import { _decorator, Label, math, Sprite } from "cc";
import { ScrollListCell } from "../../comp/ScrollListCell";
import { Xlsx, XlsxVo } from "../../cfg/Xlsx";
const { ccclass } = _decorator;

/**
 * 创角界面职业列表单元格
 */
@ccclass("CreateRoleCareerCell")
export class CreateRoleCareerCell extends ScrollListCell<XlsxVo.career> {

    onRender() {
        let bg = this.getChildComp("Bg", Sprite);
        let selected = this.getChildComp("Selected", Sprite);
        let labName = this.getChildComp("LabName", Label);
        selected.enabled = this.selected;
        labName.string = this.data.name.split("").join("  ");
    }

}